<%@page import="java.util.List"%>
<%@page import="br.com.digidata.negocio.*"%>
<%@page import="br.com.digidata.modelo.*"%>
<%
    MedicoDAO medicoDao = new MedicoDAO();
    Medico m = medicoDao.getById(Integer.parseInt(request.getParameter("medico_id")));
    
    PacienteDAO pacienteDao = new PacienteDAO();
    List<Paciente> pacientes = pacienteDao.retrive();
%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<form method="POST" name="novaAgenda" action="agendaEditDestino.jsp" id="agendaAdd">
    <label for="paciente_id">Paciente</label>
    <select id="paciente_id" name="paciente_id" class="select ui-widget-content ui-corner-all">
    	<% for(Paciente p : pacientes) { %>
    	<option value="<%=p.getId()%>"><%=p.getNome() %></option>
    	<% } %>
    </select>
    <label for="data">Data</label>
    <input type="text" id="data" name="data" class="text ui-widget-content ui-corner-all"/>
    <label for="hora">Hora</label>
    <input type="text" id="hora" name="hora" class="text ui-widget-content ui-corner-all"/>
    <input type="hidden" name="medico_id" value="<%=m.getId()%>"/>
</form>
